package com.axjy.service.impl;

import com.axjy.mapper.RoleMapper;
import com.axjy.pojo.Role;
import com.axjy.pojo.User;
import com.axjy.service.RoleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by asus on 2018/1/30.
 */
@Service("roleService")
public class RoleServiceImpl implements RoleService {

    @Resource
    private RoleMapper roleMapper;

    @Override
    public List<Role> search() {
        return roleMapper.search();
    }

    @Override
    public void delRole(Integer roleId) {
        roleMapper.delRole(roleId);
    }

    @Override
    public void addRole(Role role) {
        roleMapper.addRole(role);
    }

    @Override
    public int getRoleName(String roleName) {
        return roleMapper.getRoleName(roleName);
    }
}
